home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 April / macformat-023.iso / Shareware City / Developers / Drop•MPSR ƒ / MPSR Resource.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-12-04  |  2.0 KB  |  80 lines  |  [TEXT/KAHL]

  1. /*
  2.     MPSR Resource.h
  3.     
  4.     Describes the MPSR resource.
  5.     
  6.         From: rollin@newton.apple.com (Keith Rollin)
  7.         Subject: Re: MPSR Resource format?
  8.         
  9.         In article <phixusCvwM0H.Lus@netcom.com>, phixus@netcom.com (Chris
  10.         DeSalvo) wrote:
  11.         
  12.         >Anyone know the format of the MPSR resource that is created by MPW and
  13.         >other products?
  14.         
  15.         When reading this, keep in mind that it's from MPW code, which use 4-byte
  16.         integers.
  17.  
  18.         ----------------------------------------------------------------------------
  19.         Keith Rollin --- Phantom Programmer --- Apple Computer, Inc. --- Team Newton
  20. */
  21.  
  22. #pragma once
  23.  
  24. #ifndef __H_MPSR_Resource__
  25. #define __H_MPSR_Resource__
  26.  
  27. #define editResType        'MPSR'
  28. #define markResType    'MPSR'
  29.  
  30. // special resource ids
  31. #define editResID        1005
  32. #define markResID        1007
  33.  
  34. // Edit resource structures
  35. typedef struct FONTRSRC{
  36.     short size;                    // font size
  37.     char name[32];                    // font name
  38. } FontRSRC;
  39.  
  40. typedef struct TABRSRC{
  41.     short width;                    // width of space in points
  42.     short count;                    // tab width in spaces
  43. } TabRSRC;
  44.  
  45. typedef struct WINDRSRC{
  46.     Rect openrect;                    // rectangle of window zoomed out
  47.     Rect closerect;                    // rectangle of window zoomed in
  48. } WindRSRC;
  49.  
  50. typedef struct SELRSRC{
  51.     unsigned long date;                // time of last edit
  52.     long start;                    // offset to start of selection
  53.     long end;                        // offset to end of selection
  54.     long pos;                        // offset to first char in window
  55. } SelRSRC;
  56.  
  57. typedef struct EDITRSRC{
  58.     FontRSRC fontrsrc;
  59.     TabRSRC tabrsrc;
  60.     WindRSRC windrsrc;
  61.     SelRSRC selrsrc;
  62.     char autoindent;                // true if auto indent is on
  63.     char invisibles;                    // true if show invisibles is on
  64. } EditRSRC,* EditRSRCPtr,** EditRSRCHdl;
  65.  
  66. // Mark resource structures
  67. typedef struct MarkElement {
  68.     long start;                    // start position of mark
  69.     long end;                        // end position
  70.     unsigned char charCount;            // number of chars in mark name
  71.     char name[1];                    // first char of mark name
  72. } MarkElement;                                // (name is null terminated)
  73.  
  74. typedef struct MARKRSRC {
  75.     short count;                    // number of marks in the resource
  76.     MarkElement mark[1];            // zero or more mark elements
  77. } MarkRSRC;
  78.  
  79. #endif
  80.